﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using RegisterationCommon.Common;
using System.Collections.Specialized;

namespace RegisterationCommon.Student
{
    /// <summary>
    /// 学生信息实体操作类
    /// </summary>
    public class StudentInfo
    {
        #region 局部变量
        //主键，自动编号
        private int _ID = 0;
        //学生姓名
        private string _TrueName = "";
        //身份证号码
        private string _IDCardNumber = "";
        //登录密码
        private string _LoginPswd = "";
        //性别(true=男;false=女)
        private bool _Sex = true;
        //生日
        private DateTime _Birthday = DateTime.Now;
        //兴趣爱好
        private string _Hobby = "";
        //第一监护人姓名
        private string _FirstGuardianName = "";
        //第一监护人工作单位
        private string _FirstGuardianUnit = "";
        //第一监护人联系电话
        private string _FirstGuardianPhone = "";
        //第二监护人姓名
        private string _SecGuardianName = "";
        //第二监护人工作单位
        private string _SecGuardianUnit = "";
        //第二监护人联系电话
        private string _SecGuardianPhone = "";
        //信息状态(0=未分配;1=已分配;2=初审通过;3=初审不通过)
        private int _Status = 0;
        //所属学校的ID
        private int _SchID = 0;
        //登记时间
        private DateTime _RegisterTime = DateTime.Now;
        //电话回访反馈说明
        private string _PhoneStatusText = "";
        //电话回访状态(false=默认，未回访；true=已回访)
        private bool _PhoneStatus = false;
        //是否删除(false=未删除,true=已删除)
        private bool _IsDelete = false;
        //是否足龄
        private bool _IsMatured = false;
        //是否代录
        private bool _IsRecord = false;
        //户口所在地(0经济技术开发区1市内其它区2省内市外、外省外市)
        private int _HouseAreaID = 0;
        //住房社区
        private int _ScommAreaID = 0;
        //社区名称
        private string _ScommName = "";
        //住房小区
        private int _XcommAreaID = 0;
        //小区名称
        private string _XcommName = "";
        //学生等级(0A 1B 2C)
        private int _Level = 0;
        //等级号(A_1 B_1 C_1)
        private int _LevelNum = 0;
        //登记单号
        private string _SignUpNum = "";
        //门牌号
        private string _HouseNumber = "";
        //房产号
        private string _HouseCard = "";
        //第一监护人和他的关系
        private string _FirstRelationship = "";
        //第二监护人和他的关系
        private string _SecRelationship = "";
        //是否服从调剂
        private string _Adjustment = "";
        //学生类型(主要用来标识外籍学生)
        private string _StudentType = "bg";
        //删除或放弃原因
        private string _DeleteReason = "";
        //户口迁入时间
        private string _HouseIngoingTime = "";
        //住房入住时间
        private string _HousingOccupancyTime = "";
        //户籍地址
        private string _PermanentAddress = "";
        //是否进行了服务划分（0，没有；1划分了）
        private int _ServicesDivision = 0;
        //是否为自有房产
        private int _IsSelf = 0;
        private string _Ext1 = "";
        private string _Ext2 = "";
        private string _Ext3 = "";
        private string _Ext4 = "";
        private string _Ext5 = "";
        private int _pianid = 0;
        private string _pianname = "";
        private int _PreschoolsID = 0;
        #endregion

        #region 属性列表
        /// <summary>
        /// 第二监护人和他的关系
        /// </summary>
        public string SecRelationship
        {
            get { return _SecRelationship; }
            set { _SecRelationship = value; }
        }
        /// <summary>
        /// 第一监护人和他的关系
        /// </summary>
        public string FirstRelationship
        {
            get { return _FirstRelationship; }
            set { _FirstRelationship = value; }
        }
        /// <summary>
        /// 房产号
        /// </summary>
        public string HouseCard
        {
            get { return _HouseCard; }
            set { _HouseCard = value; }
        }
        /// <summary>
        /// 门牌号
        /// </summary>
        public string HouseNumber
        {
            get { return _HouseNumber; }
            set { _HouseNumber = value; }
        }
        /// <summary>
        /// 登记单号
        /// </summary>
        public string SignUpNum
        {
            get { return _SignUpNum; }
            set { _SignUpNum = value; }
        }
        /// <summary>
        /// 等级号(A_1 B_1 C_1)
        /// </summary>
        public int LevelNum
        {
            get { return _LevelNum; }
            set { _LevelNum = value; }
        }
        /// <summary>
        /// 学生等级(0A 1B 2C)
        /// </summary>
        public int Level
        {
            get { return _Level; }
            set { _Level = value; }
        }
        /// <summary>
        /// 小区名称
        /// </summary>
        public string XcommName
        {
            get { return _XcommName; }
            set { _XcommName = value; }
        }
        /// <summary>
        /// 住房小区
        /// </summary>
        public int XcommAreaID
        {
            get { return _XcommAreaID; }
            set { _XcommAreaID = value; }
        }
        /// <summary>
        /// 社区名称
        /// </summary>
        public string ScommName
        {
            get { return _ScommName; }
            set { _ScommName = value; }
        }
        /// <summary>
        /// 住房社区
        /// </summary>
        public int ScommAreaID
        {
            get { return _ScommAreaID; }
            set { _ScommAreaID = value; }
        }
        /// <summary>
        /// 户口所在地(0经济技术开发区1市内其它区2省内市外、外省外市)
        /// </summary>
        public int HouseAreaID
        {
            get { return _HouseAreaID; }
            set { _HouseAreaID = value; }
        }

        /// <summary>
        /// 是否代录
        /// </summary>
        public bool IsRecord
        {
            get { return _IsRecord; }
            set { _IsRecord = value; }
        }
        /// <summary>
        /// 是否足龄
        /// </summary>
        public bool IsMatured
        {
            get { return _IsMatured; }
            set { _IsMatured = value; }
        }
        /// <summary>
        /// 主键，自动编号
        /// </summary>
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        /// <summary>
        /// 学生姓名
        /// </summary>
        public string TrueName
        {
            get { return _TrueName; }
            set { _TrueName = value; }
        }
        /// <summary>
        /// 身份证号码
        /// </summary>
        public string IDCardNumber
        {
            get { return _IDCardNumber; }
            set { _IDCardNumber = value; }
        }
        /// <summary>
        /// 登录密码
        /// </summary>
        public string LoginPswd
        {
            get { return _LoginPswd; }
            set { _LoginPswd = value; }
        }
        /// <summary>
        /// 性别(true=男;false=女)
        /// </summary>
        public bool Sex
        {
            get { return _Sex; }
            set { _Sex = value; }
        }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime Birthday
        {
            get { return _Birthday; }
            set { _Birthday = value; }
        }
        /// <summary>
        /// 兴趣爱好
        /// </summary>
        public string Hobby
        {
            get { return _Hobby; }
            set { _Hobby = value; }
        }
        /// <summary>
        /// 第一监护人姓名
        /// </summary>
        public string FirstGuardianName
        {
            get { return _FirstGuardianName; }
            set { _FirstGuardianName = value; }
        }
        /// <summary>
        /// 第一监护人工作单位
        /// </summary>
        public string FirstGuardianUnit
        {
            get { return _FirstGuardianUnit; }
            set { _FirstGuardianUnit = value; }
        }
        /// <summary>
        /// 第一监护人联系电话
        /// </summary>
        public string FirstGuardianPhone
        {
            get { return _FirstGuardianPhone; }
            set { _FirstGuardianPhone = value; }
        }
        /// <summary>
        /// 第二监护人姓名
        /// </summary>
        public string SecGuardianName
        {
            get { return _SecGuardianName; }
            set { _SecGuardianName = value; }
        }
        /// <summary>
        /// 第二监护人工作单位
        /// </summary>
        public string SecGuardianUnit
        {
            get { return _SecGuardianUnit; }
            set { _SecGuardianUnit = value; }
        }
        /// <summary>
        /// 第二监护人联系电话
        /// </summary>
        public string SecGuardianPhone
        {
            get { return _SecGuardianPhone; }
            set { _SecGuardianPhone = value; }
        }
        /// <summary>
        /// 信息状态(0=未分配;1=已分配;2=初审通过;)
        /// </summary>
        public int Status
        {
            get { return _Status; }
            set { _Status = value; }
        }
        /// <summary>
        /// 所属学校的ID
        /// </summary>
        public int SchID
        {
            get { return _SchID; }
            set { _SchID = value; }
        }
        /// <summary>
        /// 登记时间
        /// </summary>
        public DateTime RegisterTime
        {
            get { return _RegisterTime; }
            set { _RegisterTime = value; }
        }
        /// <summary>
        /// 电话回访反馈说明
        /// </summary>
        public string PhoneStatusText
        {
            get { return _PhoneStatusText; }
            set { _PhoneStatusText = value; }
        }
        /// <summary>
        /// 电话回访状态(false=默认，未回访；true=已回访)
        /// </summary>
        public bool PhoneStatus
        {
            get { return _PhoneStatus; }
            set { _PhoneStatus = value; }
        }
        /// <summary>
        /// 是否删除(false=未删除,true=已删除)
        /// </summary>
        public bool IsDelete
        {
            get { return _IsDelete; }
            set { _IsDelete = value; }
        }
        /// <summary>
        /// 是否服从调剂
        /// </summary>
        public string Adjustment
        {
            get { return _Adjustment; }
            set { _Adjustment = value; }
        }
        /// <summary>
        /// 学生类型(主要用来标识外籍学生)
        /// </summary>
        public string StudentType
        {
            get { return _StudentType; }
            set { _StudentType = value; }
        }
        /// <summary>
        /// 删除或放弃原因
        /// </summary>
        public string DeleteReason
        {
            get { return _DeleteReason; }
            set { _DeleteReason = value; }
        }
        /// <summary>
        /// 户口迁入时间
        /// </summary>
        public string HouseIngoingTime
        {
            get { return _HouseIngoingTime; }
            set { _HouseIngoingTime = value; }
        }
        /// <summary>
        /// 住房入住时间
        /// </summary>
        public string HousingOccupancyTime
        {
            get { return _HousingOccupancyTime; }
            set { _HousingOccupancyTime = value; }
        }
        /// <summary>
        /// 户籍地址
        /// </summary>
        public string PermanentAddress
        {
            get { return _PermanentAddress; }
            set { _PermanentAddress = value; }
        }
        /// <summary>
        /// 是否进行了服务划分（0，没有；1划分了）
        /// </summary>
        public int ServicesDivision
        {
            get { return _ServicesDivision; }
            set { _ServicesDivision = value; }
        }
        /// <summary>
        /// 是否为自有房产（0是，1不是）
        /// </summary>
        public int IsSelf
        {
            get { return _IsSelf; }
            set { _IsSelf = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Ext1
        {
            get { return _Ext1; }
            set { _Ext1 = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Ext2
        {
            get { return _Ext2; }
            set { _Ext2 = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Ext3
        {
            get { return _Ext3; }
            set { _Ext3 = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Ext4
        {
            get { return _Ext4; }
            set { _Ext4 = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Ext5
        {
            get { return _Ext5; }
            set { _Ext5 = value; }
        }
        public string pianname
        {
            get { return _pianname; }
            set { _pianname = value; }
        }
        public int pianid
        {
            get { return _pianid; }
            set { _pianid = value; }
        }
        public int PreschoolsID
        {
            get { return _PreschoolsID; }
            set { _PreschoolsID = value; }
        }
        #endregion

        #region 静态成员
        //获取当前账号实例
        private static StudentInfo _Current;
        /// <summary>
        /// 获取当前账号实例
        /// </summary>
        public static StudentInfo Current
        {
            get
            {
                if (_Current == null)
                {
                    StudentInfo._Current = new StudentInfo();
                }
                return StudentInfo._Current;
            }
        }

        #endregion

        #region 方法列表
        #region 查询学生列表
        /// <summary>
        /// 分页获取学生信息
        /// </summary>
        /// <param name="RP">数据集</param>
        /// <returns>返回JSON格式的字符串</returns>
        public string GetStudentsList(RParams RP)
        {
            //查询当前页
            DataTable dt = DBAction.ExecSP("sp_select_page", RP).Tables[0];
            //查询条件的总条数
            int totalCount = DBAction.GetDTFromSQL("select * from " + ETableName.Students + " where " + RP.GetSqlParameter("Where").Value).Rows.Count;
            //返回Json
            return DBAction.DataTableToJson(dt, true, totalCount);
        }
        #endregion

        #region 根绝ID查询学生信息
        /// <summary>
        /// 根绝ID查询学生信息
        /// </summary>
        /// <param name="stuID">学生编号</param>
        /// <returns>查询成功返回true,否则返回false</returns>
        public bool GetStudentsByID(int stuID)
        {
            DataTable dt = DBAction.GetDTFromSQL("Select * From " + ETableName.Students + " where id=" + stuID);
            if (dt.Rows.Count < 1)
            {
                return false;
            }
            this._ID = stuID;
            this._TrueName = Convert.ToString(dt.Rows[0]["TrueName"]);
            this._IDCardNumber = Convert.ToString(dt.Rows[0]["IDCardNumber"]);
            this._LoginPswd = Convert.ToString(dt.Rows[0]["LoginPswd"]);
            this._Sex = Convert.ToBoolean(dt.Rows[0]["Sex"]);
            this._Birthday = Convert.ToDateTime(dt.Rows[0]["Birthday"]);
            this._Hobby = Convert.ToString(dt.Rows[0]["Hobby"]);
            this._FirstGuardianName = Convert.ToString(dt.Rows[0]["FirstGuardianName"]);
            this._FirstGuardianUnit = Convert.ToString(dt.Rows[0]["FirstGuardianUnit"]);
            this._FirstGuardianPhone = Convert.ToString(dt.Rows[0]["FirstGuardianPhone"]);
            this._SecGuardianName = Convert.ToString(dt.Rows[0]["SecGuardianName"]);
            this._SecGuardianUnit = Convert.ToString(dt.Rows[0]["SecGuardianUnit"]);
            this._SecGuardianPhone = Convert.ToString(dt.Rows[0]["SecGuardianPhone"]);
            this._Status = Convert.ToInt32(dt.Rows[0]["Status"]);
            this._SchID = Convert.ToInt32(dt.Rows[0]["SchID"]);
            this._RegisterTime = Convert.ToDateTime(dt.Rows[0]["RegisterTime"]);
            this._PhoneStatusText = Convert.ToString(dt.Rows[0]["PhoneStatusText"]);
            this._IsDelete = Convert.ToBoolean(dt.Rows[0]["IsDelete"]);
            this._PhoneStatus = Convert.ToBoolean(dt.Rows[0]["PhoneStatus"]);
            this._IsMatured = Convert.ToBoolean(dt.Rows[0]["IsMatured"]);
            this._IsRecord = Convert.ToBoolean(dt.Rows[0]["IsRecord"]);
            this._HouseAreaID = Convert.ToInt32(dt.Rows[0]["HouseAreaID"]);
            this._ScommAreaID = Convert.ToInt32(dt.Rows[0]["ScommAreaID"]);
            this._XcommAreaID = Convert.ToInt32(dt.Rows[0]["XcommAreaID"]);
            this._Level = Convert.ToInt32(dt.Rows[0]["Level"]);
            this._LevelNum = Convert.ToInt32(dt.Rows[0]["LevelNum"]);
            this._pianname = Convert.ToString(dt.Rows[0]["pianname"]);
            this._ScommName = Convert.ToString(dt.Rows[0]["ScommName"]);
            this._XcommName = Convert.ToString(dt.Rows[0]["XcommName"]);
            this._SignUpNum = Convert.ToString(dt.Rows[0]["SignUpNum"]);
            this._HouseNumber = Convert.ToString(dt.Rows[0]["HouseNumber"]);
            this._HouseCard = Convert.ToString(dt.Rows[0]["HouseCard"]);
            this._FirstRelationship = Convert.ToString(dt.Rows[0]["FirstRelationship"]);
            this._SecRelationship = Convert.ToString(dt.Rows[0]["SecRelationship"]);
            this._DeleteReason = Convert.ToString(dt.Rows[0]["DeleteReason"]);
            this._HouseIngoingTime = Convert.ToString(dt.Rows[0]["HouseIngoingTime"]);//户口迁入时间
            this._HousingOccupancyTime = Convert.ToString(dt.Rows[0]["HousingOccupancyTime"]);//住房入住时间
            this._PermanentAddress = Convert.ToString(dt.Rows[0]["PermanentAddress"]);//户籍地址
            this._PreschoolsID = Convert.ToInt32(dt.Rows[0]["PreschoolsID"]);//户籍地址
            return true;
        }
        #endregion

        #region 账号注册
        /// <summary>
        /// 学生登记
        /// </summary>
        /// <returns></returns>
        public bool AddNewStudentInfo()
        {
            RParams rp = new RParams();
            rp.Add("TrueName", this._TrueName, SqlDbType.VarChar);
            rp.Add("IDCardNumber", this._IDCardNumber, SqlDbType.VarChar);
            rp.Add("LoginPswd", this._LoginPswd, SqlDbType.VarChar);
            rp.Add("Sex", this._Sex, SqlDbType.Bit);
            rp.Add("Birthday", this._Birthday, SqlDbType.DateTime);
            // rp.Add("Hobby", this._Hobby, SqlDbType.VarChar);
            rp.Add("FirstGuardianName", this._FirstGuardianName, SqlDbType.VarChar);
            rp.Add("FirstGuardianUnit", this._FirstGuardianUnit, SqlDbType.VarChar);
            rp.Add("FirstGuardianPhone", this._FirstGuardianPhone, SqlDbType.VarChar);
            rp.Add("SecGuardianName", this._SecGuardianName, SqlDbType.VarChar);
            rp.Add("SecGuardianUnit", this._SecGuardianUnit, SqlDbType.VarChar);
            rp.Add("SecGuardianPhone", this._SecGuardianPhone, SqlDbType.VarChar);
            rp.Add("Status", this._Status, SqlDbType.Int);
            rp.Add("SchID", this._SchID, SqlDbType.Int);
            rp.Add("RegisterTime", this._RegisterTime, SqlDbType.DateTime);
            rp.Add("PhoneStatusText", this._PhoneStatusText, SqlDbType.VarChar);
            rp.Add("PhoneStatus", this._PhoneStatus, SqlDbType.Bit);
            rp.Add("IsDelete", this._IsDelete, SqlDbType.Bit);
            rp.Add("IsMatured", this._IsMatured, SqlDbType.Bit);
            rp.Add("IsRecord", this._IsRecord, SqlDbType.Bit);
            rp.Add("HouseAreaID", this._HouseAreaID, SqlDbType.Int);
            rp.Add("ScommAreaID", this._ScommAreaID, SqlDbType.Int);
            rp.Add("XcommAreaID", this._XcommAreaID, SqlDbType.Int);
            rp.Add("Level", this._Level, SqlDbType.Int);
            rp.Add("Adjustment", this._Adjustment, SqlDbType.NVarChar);
            rp.Add("LevelNum", this._LevelNum, SqlDbType.Int);
            rp.Add("ScommName", this._ScommName, SqlDbType.VarChar);
            rp.Add("XcommName", this._XcommName, SqlDbType.VarChar);
            rp.Add("SignUpNum", this._SignUpNum, SqlDbType.VarChar);
            rp.Add("HouseNumber", this._HouseNumber, SqlDbType.VarChar);
            rp.Add("HouseCard", this._HouseCard, SqlDbType.VarChar);
            rp.Add("FirstRelationship", this._FirstRelationship, SqlDbType.VarChar);
            rp.Add("SecRelationship", this._SecRelationship, SqlDbType.VarChar);
            rp.Add("HouseIngoingTime", this._HouseIngoingTime, SqlDbType.NVarChar);//户口迁入时间
            rp.Add("HousingOccupancyTime", this._HousingOccupancyTime, SqlDbType.NVarChar);//住房入住时间
            rp.Add("PermanentAddress", this._PermanentAddress, SqlDbType.NVarChar);//户籍地址
            rp.Add("ServicesDivision", this._ServicesDivision, SqlDbType.Int);//是否进行了服务划分（0，没有；1划分了）

            rp.Add("IsSelf", this._IsSelf, SqlDbType.Int);//是否为自有房产（0是1不是）

            rp.Add("Ext1", this._Ext1, SqlDbType.VarChar);//
            rp.Add("Ext2", this._Ext2, SqlDbType.VarChar);//
            rp.Add("Ext3", this._Ext3, SqlDbType.VarChar);//
            rp.Add("Ext4", this._Ext4, SqlDbType.VarChar);//
            rp.Add("Ext5", this._Ext5, SqlDbType.VarChar);//
            rp.Add("pianid", this._pianid, SqlDbType.Int);
            rp.Add("pianname", this._pianname, SqlDbType.VarChar);
            rp.Add("PreschoolsID", this._PreschoolsID, SqlDbType.Int);

            //添加学生信息
            if (DBAction.Insert(ETableName.Students, rp))
            {
                return true;
            }
            else
            {
                return false;
            }

        }
        #endregion
        #region 账号注册
        /// <summary>
        /// 外籍学生登记(也用于特招生登记)
        /// </summary>
        /// <returns></returns>
        public bool AddNewForeignStudentInfo()
        {
            RParams rp = new RParams();
            rp.Add("TrueName", this._TrueName, SqlDbType.VarChar);
            rp.Add("IDCardNumber", this._IDCardNumber, SqlDbType.VarChar);
            rp.Add("LoginPswd", this._LoginPswd, SqlDbType.VarChar);
            rp.Add("Sex", this._Sex, SqlDbType.Bit);
            rp.Add("Birthday", this._Birthday, SqlDbType.DateTime);
            // rp.Add("Hobby", this._Hobby, SqlDbType.VarChar);
            rp.Add("FirstGuardianName", this._FirstGuardianName, SqlDbType.VarChar);
            rp.Add("FirstGuardianUnit", this._FirstGuardianUnit, SqlDbType.VarChar);
            rp.Add("FirstGuardianPhone", this._FirstGuardianPhone, SqlDbType.VarChar);
            rp.Add("SecGuardianName", this._SecGuardianName, SqlDbType.VarChar);
            rp.Add("SecGuardianUnit", this._SecGuardianUnit, SqlDbType.VarChar);
            rp.Add("SecGuardianPhone", this._SecGuardianPhone, SqlDbType.VarChar);
            rp.Add("Status", this._Status, SqlDbType.Int);
            rp.Add("SchID", this._SchID, SqlDbType.Int);
            rp.Add("RegisterTime", this._RegisterTime, SqlDbType.DateTime);
            rp.Add("PhoneStatusText", this._PhoneStatusText, SqlDbType.VarChar);
            rp.Add("PhoneStatus", this._PhoneStatus, SqlDbType.Bit);
            rp.Add("IsDelete", this._IsDelete, SqlDbType.Bit);
            rp.Add("IsMatured", this._IsMatured, SqlDbType.Bit);
            rp.Add("IsRecord", this._IsRecord, SqlDbType.Bit);
            rp.Add("HouseAreaID", this._HouseAreaID, SqlDbType.Int);
            rp.Add("ScommAreaID", this._ScommAreaID, SqlDbType.Int);
            rp.Add("XcommAreaID", this._XcommAreaID, SqlDbType.Int);
            rp.Add("Level", this._Level, SqlDbType.Int);
            rp.Add("Adjustment", this._Adjustment, SqlDbType.NVarChar);
            rp.Add("LevelNum", this._LevelNum, SqlDbType.Int);
            rp.Add("ScommName", this._ScommName, SqlDbType.VarChar);
            rp.Add("XcommName", this._XcommName, SqlDbType.VarChar);
            rp.Add("SignUpNum", this._SignUpNum, SqlDbType.VarChar);
            rp.Add("HouseNumber", this._HouseNumber, SqlDbType.VarChar);
            rp.Add("HouseCard", this._HouseCard, SqlDbType.VarChar);
            rp.Add("FirstRelationship", this._FirstRelationship, SqlDbType.VarChar);
            rp.Add("SecRelationship", this._SecRelationship, SqlDbType.VarChar);
            rp.Add("StudentType", this._StudentType, SqlDbType.VarChar);//添加学生类型(主要用于标记外籍学生)
            rp.Add("HousingOccupancyTime", this._HousingOccupancyTime, SqlDbType.NVarChar);//住房入住时间
            rp.Add("ServicesDivision", this._ServicesDivision, SqlDbType.Int);//是否进行了服务划分（0，没有；1划分了）
            rp.Add("IsSelf", this.IsSelf, SqlDbType.Int);
            rp.Add("Ext1", this.Ext1, SqlDbType.VarChar);
            rp.Add("Ext2", this.Ext2, SqlDbType.VarChar);
            rp.Add("Ext3", this.Ext3, SqlDbType.VarChar);
            rp.Add("Ext4", this.Ext4, SqlDbType.VarChar);
            rp.Add("Ext5", this.Ext5, SqlDbType.VarChar);
            rp.Add("pianid", this._pianid, SqlDbType.Int);
            rp.Add("pianname", this._pianname, SqlDbType.VarChar);
            rp.Add("PreschoolsID", this._PreschoolsID, SqlDbType.Int);
            //添加学生信息
            if (DBAction.Insert(ETableName.Students, rp))
            {
                return true;
            }
            else
            {
                return false;
            }

        }
        #endregion
        #region 账号登录验证 保存cookie状态
        /// <summary>
        /// 执行账号登录验证 保存cookie状态
        /// </summary>
        /// <param name="accountName">账号</param>
        /// <param name="accountPswd">MD5加密后的密码</param>
        /// <returns>登录成功返回true,否则返回false</returns>
        public bool ToLogin(string idCardNumber, string loginPswd)
        {
            string studenttype = "select * from " + ETableName.Students + " where IDCardNumber='" + idCardNumber + "' and LoginPswd='" + loginPswd + "'";
            DataTable studenttypedt = DBAction.GetDTFromSQL(studenttype);
            foreach (DataRow row in studenttypedt.Rows)
            {
                if (row["StudentType"].ToString() != "wj")
                {
                    //非法字符验证
                    if (!BaseLibrary.Verification(idCardNumber, false, EVerification.SafeString) || !BaseLibrary.Verification(loginPswd, false, EVerification.SafeString))
                    {
                        return false;
                    }
                }
            }
            //非法字符验证
            //if (!BaseLibrary.Verification(idCardNumber, false, EVerification.SafeString) || !BaseLibrary.Verification(loginPswd, false, EVerification.SafeString))
            //{
            //    return false;
            //}

            string sql = "select * from " + ETableName.Students + " where IDCardNumber='" + idCardNumber + "' and LoginPswd='" + loginPswd + "'";
            DataTable dt = DBAction.GetDTFromSQL(sql);
            if (dt.Rows.Count < 1)
            {
                return false;
            }

            //保存到变量里
            this._ID = Convert.ToInt32(dt.Rows[0]["ID"]);
            this._TrueName = Convert.ToString(dt.Rows[0]["TrueName"]);
            this._IDCardNumber = Convert.ToString(dt.Rows[0]["IDCardNumber"]);
            this._LoginPswd = Convert.ToString(dt.Rows[0]["LoginPswd"]);
            this._Sex = Convert.ToBoolean(dt.Rows[0]["Sex"]);
            this._Birthday = Convert.ToDateTime(dt.Rows[0]["Birthday"]);
            this._Hobby = Convert.ToString(dt.Rows[0]["Hobby"]);
            this._FirstGuardianName = Convert.ToString(dt.Rows[0]["FirstGuardianName"]);
            this._FirstGuardianUnit = Convert.ToString(dt.Rows[0]["FirstGuardianUnit"]);
            this._FirstGuardianPhone = Convert.ToString(dt.Rows[0]["FirstGuardianPhone"]);
            this._SecGuardianName = Convert.ToString(dt.Rows[0]["SecGuardianName"]);
            this._SecGuardianUnit = Convert.ToString(dt.Rows[0]["SecGuardianUnit"]);
            this._SecGuardianPhone = Convert.ToString(dt.Rows[0]["SecGuardianPhone"]);
            this._Status = Convert.ToInt32(dt.Rows[0]["Status"]);
            this._SchID = Convert.ToInt32(dt.Rows[0]["SchID"]);
            this._RegisterTime = Convert.ToDateTime(dt.Rows[0]["RegisterTime"]);
            this._PhoneStatusText = Convert.ToString(dt.Rows[0]["PhoneStatusText"]);
            this._PhoneStatus = Convert.ToBoolean(dt.Rows[0]["PhoneStatus"]);
            this._IsDelete = Convert.ToBoolean(dt.Rows[0]["IsDelete"]);
            this._IsMatured = Convert.ToBoolean(dt.Rows[0]["IsMatured"]);
            this._IsRecord = Convert.ToBoolean(dt.Rows[0]["IsRecord"]);
            this._HouseAreaID = Convert.ToInt32(dt.Rows[0]["HouseAreaID"]);
            this._ScommAreaID = Convert.ToInt32(dt.Rows[0]["ScommAreaID"]);
            this._XcommAreaID = Convert.ToInt32(dt.Rows[0]["XcommAreaID"]);
            this._Level = Convert.ToInt32(dt.Rows[0]["Level"]);
            this._LevelNum = Convert.ToInt32(dt.Rows[0]["LevelNum"]);
            this._ScommName = Convert.ToString(dt.Rows[0]["ScommName"]);
            this._XcommName = Convert.ToString(dt.Rows[0]["XcommName"]);
            this._SignUpNum = Convert.ToString(dt.Rows[0]["SignUpNum"]);
            this._HouseNumber = Convert.ToString(dt.Rows[0]["HouseNumber"]);
            this._HouseCard = Convert.ToString(dt.Rows[0]["HouseCard"]);
            this._FirstRelationship = Convert.ToString(dt.Rows[0]["FirstRelationship"]);
            this._SecRelationship = Convert.ToString(dt.Rows[0]["SecRelationship"]);
            this._PreschoolsID = Convert.ToInt32(dt.Rows[0]["PreschoolsID"]);

            //Cookies.Clear();
            ////Cookies.Set("ID", this._ID.ToString());
            ////Cookies.Set("TrueName", this._TrueName.ToString());
            ////Cookies.Set("IDCardNumber", this._IDCardNumber.ToString());
            ////Cookies.Set("LoginPswd", this._LoginPswd.ToString());
            ////Cookies.Set("Sex", this._Sex.ToString());
            ////Cookies.Set("Birthday", this._Birthday.ToString());
            ////Cookies.Set("RegisterTime", this._RegisterTime.ToString());

            NameValueCollection nvc = new NameValueCollection();
            nvc.Add("ID", this._ID.ToString().Trim());//学生ID
            nvc.Add("TrueName", this._TrueName.ToString().Trim());//学生姓名
            nvc.Add("IDCardNumber", this._IDCardNumber.ToString().Trim());//存储用户身份证
            nvc.Add("LoginPswd", this._LoginPswd.ToString().Trim());//用户密码
            nvc.Add("Sex", this._Sex.ToString().Trim());//性别
            nvc.Add("Birthday", this._Birthday.ToString().Trim());//出生日期
            nvc.Add("RegisterTime", this._RegisterTime.ToString().Trim());//注册时间
            CookiesInfo.SetObj("Robo", 60 * 60 * 24, nvc);//设置cookies有效期24小时


            return true;
        }
        #endregion
        #region 退出系统
        /// <summary>
        /// 退出系统
        /// </summary>
        public void Logout()
        {
            Cookies.Clear();
            Message.Send(10014);
        }
        #endregion
        #region 判断当前账号是否登录状态
        /// <summary>
        /// 判断账号是否登录状态，并且账号信息是否安全
        /// </summary>
        /// <returns></returns>
        public bool IsLogin()
        {
            bool isLogin = false;
            //if (Cookies.Exists())
            if (!string.IsNullOrEmpty(CookiesInfo.GetValue("Robo", "IDCardNumber")) && !string.IsNullOrEmpty(CookiesInfo.GetValue("Robo", "LoginPswd")))
            {
                ////string sql = "select * from " + ETableName.Students + " where IDCardNumber='" + Cookies.Get("IDCardNumber") + "' and LoginPswd='" + Cookies.Get("LoginPswd") + "'";
                string sql = "select * from " + ETableName.Students + " where IDCardNumber='" + CookiesInfo.GetValue("Robo", "IDCardNumber") + "' and LoginPswd='" + CookiesInfo.GetValue("Robo", "LoginPswd") + "'";
                DataTable dt = DBAction.GetDTFromSQL(sql);
                if (dt.Rows.Count < 1)
                {
                    isLogin = false;
                    return isLogin;
                }
                isLogin = true;
            }

            return isLogin;
        }
        #endregion
        #region 修改账号信息
        /// <summary>
        /// 根据id修改账号信息
        /// </summary>
        ///  <returns>修改成功返回true,否则返回false</returns>
        public bool MdfAccount(StudentInfo student_Info)
        {
            RParams rp = new RParams();
            rp.Add("ID", student_Info._ID, SqlDbType.BigInt);
            rp.Add("TrueName", student_Info._TrueName, SqlDbType.VarChar);
            rp.Add("Sex", student_Info._Sex, SqlDbType.Bit);
            rp.Add("Birthday", student_Info._Birthday, SqlDbType.DateTime);
            //rp.Add("Hobby", student_Info._Hobby, SqlDbType.VarChar);
            rp.Add("FirstGuardianName", student_Info._FirstGuardianName, SqlDbType.VarChar);
            rp.Add("FirstGuardianUnit", student_Info._FirstGuardianUnit, SqlDbType.VarChar);
            rp.Add("FirstGuardianPhone", student_Info._FirstGuardianPhone, SqlDbType.VarChar);
            rp.Add("SecGuardianName", student_Info._SecGuardianName, SqlDbType.VarChar);
            rp.Add("SecGuardianUnit", student_Info._SecGuardianUnit, SqlDbType.VarChar);
            rp.Add("SecGuardianPhone", student_Info._SecGuardianPhone, SqlDbType.VarChar);
            rp.Add("IsMatured", student_Info._IsMatured, SqlDbType.Bit);
            rp.Add("IsRecord", student_Info._IsRecord, SqlDbType.Bit);
            rp.Add("HouseAreaID", student_Info._HouseAreaID, SqlDbType.Int);
            rp.Add("SchID", student_Info._SchID, SqlDbType.Int);
            rp.Add("ScommAreaID", student_Info._ScommAreaID, SqlDbType.Int);
            rp.Add("XcommAreaID", student_Info._XcommAreaID, SqlDbType.Int);
            rp.Add("Level", student_Info._Level, SqlDbType.Int);
            rp.Add("Adjustment", student_Info.Adjustment, SqlDbType.NVarChar);
            rp.Add("LevelNum", student_Info._LevelNum, SqlDbType.Int);
            rp.Add("ScommName", student_Info._ScommName, SqlDbType.VarChar);
            rp.Add("XcommName", student_Info._XcommName, SqlDbType.VarChar);
            rp.Add("SignUpNum", student_Info._SignUpNum, SqlDbType.VarChar);
            rp.Add("HouseNumber", student_Info._HouseNumber, SqlDbType.VarChar);
            rp.Add("HouseCard", student_Info._HouseCard, SqlDbType.VarChar);
            rp.Add("FirstRelationship", student_Info._FirstRelationship, SqlDbType.VarChar);
            rp.Add("SecRelationship", student_Info._SecRelationship, SqlDbType.VarChar);
            rp.Add("HouseIngoingTime", this._HouseIngoingTime, SqlDbType.NVarChar);//户口迁入时间
            rp.Add("HousingOccupancyTime", this._HousingOccupancyTime, SqlDbType.NVarChar);//住房入住时间
            rp.Add("PermanentAddress", this._PermanentAddress, SqlDbType.NVarChar);//户籍地址
            rp.Add("ServicesDivision", this._ServicesDivision, SqlDbType.Int);//是否进行了服务划分（0，没有；1划分了）
            rp.Add("Status", this._Status, SqlDbType.Int);
            rp.Add("IsSelf", this._IsSelf, SqlDbType.Int);
            rp.Add("Ext1", this._Ext1, SqlDbType.VarChar);
            rp.Add("Ext2", this._Ext2, SqlDbType.VarChar);
            rp.Add("Ext3", this._Ext3, SqlDbType.VarChar);
            rp.Add("Ext4", this._Ext4, SqlDbType.VarChar);
            rp.Add("Ext5", this._Ext5, SqlDbType.VarChar);
            rp.Add("pianname", this._pianname, SqlDbType.VarChar);
            rp.Add("pianid", this._pianid, SqlDbType.Int);
            rp.Add("PreschoolsID", this._PreschoolsID, SqlDbType.Int);
            string colFields = "TrueName,Sex,Birthday,FirstGuardianName,FirstGuardianUnit,";
            colFields += "FirstGuardianPhone,SecGuardianName,SecGuardianUnit,SecGuardianPhone,";
            colFields += "IsMatured,IsRecord,HouseAreaID,ScommAreaID,XcommAreaID,Level,Adjustment,LevelNum,";
            colFields += "ScommName,XcommName,SignUpNum,HouseNumber,HouseCard,FirstRelationship,SecRelationship,HouseIngoingTime,HousingOccupancyTime,PermanentAddress,ServicesDivision,Status,SchID,IsSelf,Ext1,Ext2,Ext3,Ext4,Ext5,pianname,pianid,PreschoolsID";
            string whereFields = "ID=@ID";
            return MdfAccount(colFields, whereFields, rp);
        }
        /// <summary>
        /// 修改账号信息
        /// </summary>
        /// <param name="colFields">修改的列</param>
        /// <param name="whereFields">修改条件</param>
        /// <param name="RP">数据集</param>
        ///  <returns>修改成功返回true,否则返回false</returns>
        public bool MdfAccount(string colFields, string whereFields, RParams RP)
        {
            return DBAction.Update(ETableName.Students, colFields, whereFields, RP);
        }
        #endregion

        #region 修改账号密码
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="accountID">账号ID</param>
        /// <param name="accountID">MD5加密后的账号密码</param>
        /// <returns>修改成功返回true,否则返回false</returns>
        public bool MdfAccountPwd(long accountID, string loginPswd)
        {
            bool isSucceed = false;

            //非法字符验证
            if (!BaseLibrary.Verification(loginPswd, false, EVerification.SafeString))
            {
                isSucceed = false;
            }

            RParams RP = new RParams();
            RP.Add("ID", accountID, SqlDbType.BigInt);
            RP.Add("LoginPswd", loginPswd, SqlDbType.VarChar);

            string colFields = "LoginPswd";
            string whereFields = "ID=@ID";

            //更新学生密码
            if (DBAction.Update(ETableName.Students, colFields, whereFields, RP))
            {
                Cookies.Set("LoginPswd", loginPswd);
                isSucceed = true;
            }
            else
            {
                isSucceed = false;
            }
            return isSucceed;
        }
        /// <summary>
        /// 修改当前登录用户密码
        /// </summary>
        /// <returns>修改成功返回true,否则返回false</returns>
        public bool MdfAccountPwd()
        {
            return MdfAccountPwd(Convert.ToInt64(CookiesInfo.GetValue("Robo", "ID").ToString()), this._LoginPswd);
        }
        #endregion
        /// <summary>
        /// 修改服务划分表里面的学校id
        /// </summary>
        /// <param name="studentID">要设置的学生ID</param>
        /// <param name="phoneStatusText">电话回访反馈说明</param>
        /// <returns></returns>
        public bool UpdateSchoolID(int xcommunityID, int schoolID)
        {
            RParams rp = new RParams();
            rp.Add("ID", xcommunityID, SqlDbType.Int);
            rp.Add("SclID", schoolID, SqlDbType.Int);
            return DBAction.Update(ETableName.Community, "SclID", "ID=@ID", rp);
        }
        /// <summary>
        /// 修改学生信息表里面的学校id
        /// </summary>
        /// <param name="studentID">要设置的学生ID</param>
        /// <param name="phoneStatusText">电话回访反馈说明</param>
        /// <returns></returns>
        public bool UpdateStudentInfoID(int xcommunityID, int schoolID)
        {
            RParams rp = new RParams();
            rp.Add("XcommAreaID", xcommunityID, SqlDbType.Int);
            rp.Add("SchID", schoolID, SqlDbType.Int);
            rp.Add("ServicesDivision", 1, SqlDbType.Int);
            return DBAction.Update(ETableName.Students, "SchID,ServicesDivision", "XcommAreaID=@XcommAreaID", rp);
        }
        /// <summary>
        /// 修改学生信息表里面的学校id
        /// </summary>
        /// <param name="studentID">要设置的学生ID</param>
        /// <param name="phoneStatusText">电话回访反馈说明</param>
        /// <returns></returns>
        public bool UpdateStudentInfo(int scommunityID, int schoolID)
        {
            RParams rp = new RParams();
            rp.Add("SchID", schoolID);
            rp.Add("ServicesDivision", 1);
            return DBAction.Update(ETableName.Students, "SchID,ServicesDivision", "ScommAreaID=" + scommunityID, rp);
        }
        #region 设置电话回访反馈说明
        /// <summary>
        /// 根据学生ID，设置电话回访反馈说明，更新PhoneStatusText数据
        /// </summary>
        /// <param name="studentID">要设置的学生ID</param>
        /// <param name="phoneStatusText">电话回访反馈说明</param>
        /// <returns></returns>
        public bool SetPhoneStatusText(int studentID, string phoneStatusText, bool phoneStatus)
        {
            RParams rp = new RParams();
            rp.Add("ID", studentID, SqlDbType.BigInt);
            rp.Add("PhoneStatusText", phoneStatusText, SqlDbType.VarChar);
            rp.Add("PhoneStatus", phoneStatus, SqlDbType.Bit);
            return DBAction.Update(ETableName.Students, "PhoneStatusText,PhoneStatus", "ID=@ID", rp);
        }
        /// <summary>
        /// 设置当前学生电话回访反馈说明，更新PhoneStatusText数据
        /// </summary>
        /// <returns></returns>
        public bool SetPhoneStatusText()
        {
            return SetPhoneStatusText(this._ID, this._PhoneStatusText, this._PhoneStatus);
        }
        #endregion

        #region 设置电话回访状态
        /// <summary>
        /// 根据学生ID，设置是否已经过电话回访
        /// </summary>
        /// <param name="studentID">学生ID</param>
        /// <param name="phoneStatus">Bool类型的回访状态</param>
        /// <returns></returns>
        public bool SetPhoneStatus(int studentID, bool phoneStatus)
        {
            RParams rp = new RParams();
            rp.Add("ID", studentID, SqlDbType.BigInt);
            rp.Add("PhoneStatus", phoneStatus, SqlDbType.Bit);

            return DBAction.Update(ETableName.Students, "PhoneStatus", "ID=@ID", rp);
        }
        /// <summary>
        /// 设置当前学生是否已经过电话回访
        /// </summary>
        /// <returns></returns>
        public bool SetPhoneStatus()
        {
            return SetPhoneStatus(this._ID, this._PhoneStatus);
        }
        #endregion

        #region 设置学生信息为删除状态
        /// <summary>
        /// 根据学生ID，设置学生信息为删除状态
        /// </summary>
        /// <param name="studentID">学生ID</param>
        /// <param name="deleteStatus">Bool类型的回访状态</param>
        /// <returns></returns>
        public bool SetDeleteStatic(int studentID, bool deleteStatus)
        {
            RParams rp = new RParams();
            rp.Add("ID", studentID, SqlDbType.BigInt);
            rp.Add("IsDelete", deleteStatus, SqlDbType.Bit);

            return DBAction.Update(ETableName.Students, "IsDelete", "ID=@ID", rp);
        }
        /// <summary>
        /// 根据学生ID，设置学生信息为删除状态
        /// </summary>
        /// <param name="studentID">学生ID</param>
        /// <param name="deleteStatus">Bool类型的回访状态</param>
        /// <returns></returns>
        public bool DeleteorGiveupStatic()
        {
            RParams rp = new RParams();
            rp.Add("ID", this._ID, SqlDbType.BigInt);
            rp.Add("IsDelete", this.IsDelete, SqlDbType.Bit);
            rp.Add("DeleteReason", this.DeleteReason, SqlDbType.NVarChar);
            return DBAction.Update(ETableName.Students, "IsDelete,DeleteReason", "ID=@ID", rp);
        }
        /// <summary>
        /// 设置当前学生信息为删除状态
        /// </summary>
        /// <returns></returns>
        public bool SetDeleteStatic()
        {
            return SetDeleteStatic(this._ID, this._IsDelete);
        }
        #endregion

        #region 分配学校
        /// <summary>
        /// 根据学生ID，分配学校
        /// </summary>
        /// <param name="studentID">学生ID</param>
        /// <param name="deleteStatus">学校ID</param>
        /// <returns></returns>
        public bool SetSclID(int studentID, int schID, string Ext2)
        {
            RParams rp = new RParams();
            rp.Add("ID", studentID, SqlDbType.BigInt);
            rp.Add("SchID", schID, SqlDbType.Int);
            rp.Add("Status", 1, SqlDbType.Int);

            rp.Add("Ext2", Ext2, SqlDbType.VarChar);
            //rp.Add("ServicesDivision", 1, SqlDbType.Int);

            //return DBAction.Update(ETableName.Students, "SchID,Status,Ext2,ServicesDivision", "ID=@ID", rp);
            return DBAction.Update(ETableName.Students, "SchID,Status,Ext2", "ID=@ID", rp);
        }
        /// <summary>
        /// 分配学校
        /// </summary>
        /// <returns></returns>
        public bool SetSclID()
        {
            //return SetSclID(this._ID, this._SchID);
            return SetSclID(this._ID, this._SchID, this._Ext2);
        }
        #endregion

        #region 从数据库删除学生信息
        /// <summary>
        /// 根据指定的学生ID删除学生信息
        /// </summary>
        /// <param name="studentID"></param>
        /// <returns></returns>
        public bool DeleteStudent(int studentID)
        {
            RParams rp = new RParams();
            rp.Add("ID", studentID, SqlDbType.BigInt);

            return DBAction.Delete(ETableName.Students, "ID=@ID", rp);
        }
        /// <summary>
        /// 根据指定的学生ID删除学生信息
        /// </summary>
        /// <returns></returns>
        public bool DeleteStudent()
        {
            return DeleteStudent(_ID);
        }
        /// <summary>
        /// 根据指定的学生ID列表删除学生信息
        /// </summary>
        /// <param name="studentIDList"></param>
        /// <returns></returns>
        public bool DeleteStudents(string studentIDList)
        {
            return DBAction.Delete("Students", "id in (" + studentIDList + ")");
        }
        #endregion

        #region 根据id修改账号状态
        /// <summary>
        /// 根据id修改账号状态
        /// </summary>
        ///  <returns>修改成功返回true,否则返回false</returns>
        public bool MdfStatus()
        {
            RParams rp = new RParams();
            rp.Add("ID", this._ID, SqlDbType.BigInt);
            rp.Add("Status", this._Status, SqlDbType.VarChar);

            string colFields = "Status";
            string whereFields = "ID=@ID";
            return MdfAccount(colFields, whereFields, rp);
        }
        #endregion

        #region 根据id修改账号状态放弃
        /// <summary>
        /// 根据id修改账号状态
        /// </summary>
        ///  <returns>修改成功返回true,否则返回false</returns>
        public bool MdfGiveUpStatus()
        {
            RParams rp = new RParams();
            rp.Add("ID", this._ID, SqlDbType.BigInt);
            rp.Add("Status", this._Status, SqlDbType.VarChar);
            rp.Add("DeleteReason", this._DeleteReason, SqlDbType.NVarChar);

            string colFields = "Status,DeleteReason";
            string whereFields = "ID=@ID";
            return MdfAccount(colFields, whereFields, rp);
        }
        #endregion
        #region 根据id取消分配
        /// <summary>
        /// 根据id修改账号状态
        /// </summary>
        ///  <returns>修改成功返回true,否则返回false</returns>
        public bool MdfStatusSchIDByID()
        {
            RParams rp = new RParams();
            rp.Add("ID", this._ID, SqlDbType.BigInt);
            rp.Add("SchID", _SchID, SqlDbType.Int);
            rp.Add("Status", _Status, SqlDbType.VarChar);

            string colFields = "Status,SchID";
            string whereFields = "ID=@ID";
            return MdfAccount(colFields, whereFields, rp);
        }
        #endregion

        #region 根据id取消分配
        /// <summary>
        /// 根据id取消删除
        /// </summary>
        ///  <returns>修改成功返回true,否则返回false</returns>
        public bool MdfStatusSchIDIsDelByID()
        {
            RParams rp = new RParams();
            rp.Add("ID", this._ID, SqlDbType.BigInt);
            rp.Add("SchID", _SchID, SqlDbType.Int);
            rp.Add("Status", _Status, SqlDbType.VarChar);
            rp.Add("IsDelete", _IsDelete, SqlDbType.VarChar);

            string colFields = "Status,SchID,IsDelete";
            string whereFields = "ID=@ID";
            return MdfAccount(colFields, whereFields, rp);
        }
        #endregion
        #region 根据id取消删除
        /// <summary>
        /// 根据id取消删除
        /// </summary>
        ///  <returns>修改成功返回true,否则返回false</returns>
        public bool MdfIsDelByID()
        {
            RParams rp = new RParams();
            rp.Add("ID", this._ID, SqlDbType.BigInt);
            rp.Add("IsDelete", _IsDelete, SqlDbType.VarChar);

            string colFields = "IsDelete";
            string whereFields = "ID=@ID";
            return MdfAccount(colFields, whereFields, rp);
        }
        #endregion
        #endregion
    }
}
